 <template>
  <div class>
    <form>
      <inputFactory
        v-for="(item,index) in inputList"
        :name="item"
        :type="type"
        :status="status"
        :key="index"
      />
    </form>
  </div>
</template>

<script type="text/ecmascript-6">
import inputFactory from "./inputFactory";

const formMap = {
  clientLogin: ["mobile", "password"],
  bindMobile: ["mobile", "smsCode"],
  forgetpassword: ["mobile", "smsCodef"],
    spreadLogin: ["storename","mobile","password1","recommend"],
    resetpassword:["passwordCom"]
  //   clientMobileChange: ["mobile", "mobileNew"],

  //   adminLogin: ["mobile", "password"],
  //   adminPWForget: ["mobile", "msgValidate"],
  //   adminPWForgetChange: ["passwordNew", "passwordConfirm", "msgValidate"],
  //   adminPWChange: ["password", "passwordNew", "passwordConfirm"]
};

export default {
  name: "Form",
  data() {
    return {};
  },
  props: {
    name: "",
    type: "",
    status: "1"
  },
  computed: {
    inputList() {
      return formMap[this.type];
    }
  },
  components: {
    inputFactory
  }
};
</script>

 <style scoped lang="scss">
</style>
